home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / aa_Intel_Only / TimeShift / TimeShift.pkg / TimeShift.pre_delete < prev    next >
Encoding:
Text File  |  1995-12-03  |  590 b   |  33 lines

  1. #!/bin/sh
  2.  
  3. PKG_Path=$1
  4. Location=$2
  5. ASK=$PKG_Path/ask
  6. RC=$Location/etc/rc
  7.  
  8. echo Checking status of reboot and shutdown.
  9.  
  10. Targets="reboot halt"
  11. Location=$2
  12. TimeShift=$Location/usr/etc/timeshift
  13.  
  14. for Target in $Targets
  15. do
  16.     File=$Location/usr/etc/$Target
  17.     if [ -f $File.real ]
  18.     then    if /usr/ucb/what $File.real | grep -s 'Berkeley'
  19.         then    rm $File
  20.             if mv $File.real $File
  21.             then    echo Moved $File.real to $File
  22.             else    echo "Could not rename $File!" >&2
  23.                 exit 1
  24.             fi
  25.         fi
  26.         /usr/ucb/what $File
  27.     else    echo $File not present
  28.         exit 1
  29.     fi
  30. done
  31.  
  32. echo "Remember to remove the timeshift hook."
  33.